<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="styles/simditor.css" />
<link rel="stylesheet" href="styles/simditor-markdown.css" media="screen" charset="utf-8" />
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<style type="text/css" >
.markdown-editor textarea{
height: 100% !important;
}
.simditor-wrapper {
height: 100% !important;
}
.simditor-body {
width: 50% !important;
    position: absolute !important;
    right: 0 !important;
	height: 100% !important;
}
.markdown-editor {
display: inline-block !important;
    position: absolute !important;
    width: 50% !important;
	height: 100% !important;
}
</style>
</head>
<body>

<textarea id="editor" data-autosave="editor-content" autofocus></textarea>
<script type="text/javascript" src="scripts/module.js"></script>
<script type="text/javascript" src="scripts/hotkeys.js"></script>
<script type="text/javascript" src="scripts/uploader.js"></script>
<script type="text/javascript" src="scripts/simditor.js"></script>
<script type="text/javascript" src="scripts/marked.js"></script>
<script type="text/javascript" src="scripts/to-markdown.js"></script>
<script type="text/javascript" src="scripts/simditor-markdown.js"></script>
<script type="text/javascript" src="scripts/simditor-autosave.js"></script>
<script type="text/javascript">

var editor = new Simditor({
  textarea: $('#editor'),
  markdown: true,
  toolbar: ['bold', 'italic', 'underline', 'color', '|', 'ol', 'ul', '|', 'markdown'],
  autosave: 'editor-content'
});
var b = simple.hotkeys();
b.add('ctrl+q',function() {
var text = document.getElementsByClassName('markdown-editor')[0];
    if (document.body.createTextRange) {
        var range = document.body.createTextRange();
        range.moveToElementText(text);
        range.select();
    } else if (window.getSelection) {
        var selection = window.getSelection();
        var range = document.createRange();
        range.selectNodeContents(text);
        selection.removeAllRanges();
        selection.addRange(range);
        /*if(selection.setBaseAndExtent){
            selection.setBaseAndExtent(text, 0, text, 1);
        }*/
    } else {
        alert("none");
    }
document.execCommand("Copy");
})
</script>
</body>
<html>